
<?php
    $config = Zend_Registry::get('config');
    $this->headLink()->appendStylesheet('/js/jquery-ui.css');
    $this->headLink()->appendStylesheet('/js/elfinder/css/elfinder.css');
    $this->headScript()->appendFile('/js/jquery.js');
    $this->headScript()->appendFile('/js/jquery.ui.js');
    $this->headScript()->appendFile('/js/elfinder/js/elfinder.min.js');
    $this->headScript()->appendFile('/js/elfinder/js/i18n/elfinder.ru.js');
    $this->headScript()->captureStart('text/javascript');
?>

     $().ready(function() {

        $('#finder').elfinder({
            url : <?php echo "'".ADMIN_URL."/files/connector/'" ?>,
            lang : '<?php echo $config->lang ?>',
            editorCallback : function(url) {
               $("#copyline").text = url;
               window.tinymceFileWin.document.forms[0].elements[window.tinymceFileField].value = url;
               window.tinymceFileWin.document.forms[0].elements[window.tinymceFileField].focus();
               window.tinymceFileWin.document.forms[0].elements[window.tinymceFileField].onchange();
               window.close();
            }
        })

     })



<?php $this->headScript()->captureEnd(); ?>

<?php echo $this->headLink(); ?>
<?php echo $this->headScript(); ?>
<div id="finder"></div>






